<h1>Restful Thread Messages</h1>

<p><%= rtm_menu -%></p>

<p><%= flash[:notice] %></p>

<% form_for :message, :url => do_selected_messages_path do |f| %>
  <%= hidden_field_tag :type, 'outbox' %>
  <p>
    <%= submit_tag "Delete" unless @box_threads.empty? %>
  </p>
  <p>
    <div id='message_threads'>
      <%= render :partial => "outbox_thread", :collection => @box_threads %>
    </div>
  </p>
  <p>
    <%= @box_threads.empty? ? 'Empty' : "#{@box_threads.size} threads" %>
  </p>
<% end %>